Skip to content

Added Unit tests - #15

Merged
aksm-ms merged 8 commits into
Azure:masterfrom
aksm-ms:unit-tests
Apr 8, 2020
Merged

Added Unit tests#15
aksm-ms merged 8 commits into
Azure:masterfrom
aksm-ms:unit-tests

Conversation

@aksm-ms

@aksm-ms aksm-ms commented Apr 1, 2020

Copy link
Copy Markdown
Contributor

static async executePowerShellCommand(command: string, options: any = {}) {
await exec.exec(`"${PowerShellToolRunner.psPath}" -Command "${command}"`, [], options);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this anymore?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, we are using executePowerShellScriptBlock instead of executePowerShellCommand,hence removed unused function

Comment thread babel.config.js Outdated
@@ -0,0 +1,7 @@
// babel.config.js

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am using typescript to write tests. please refer https://jestjs.io/docs/en/getting-started#using-typescript

Comment thread package.json Outdated
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using babel ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, followed setup as per jest docs - https://jestjs.io/docs/en/getting-started#using-typescript

@SumiranAgg

Copy link
Copy Markdown
Member

Add workflow for CI

@aksm-ms
aksm-ms merged commit 3ec3e73 into Azure:master Apr 8, 2020
aksm-ms added a commit to aksm-ms/login that referenced this pull request May 4, 2020
Changes in loginAzurePowerShell.ts

using latest version

Added getlatestazmodule version

changes in runner info

code refactor

changes in loginAzurePowerShell

code refactor

Code refactor

Code refactor

added review comments

changes in scriptbuilder

changes in setmodulepath

added paths in tsconfig.json

Revert "added paths in tsconfig.json"

This reverts commit cb2f417.

changes in action.yml

changes in main

added review comments

Added changes for review comments

Modified description in action.yml

Added telemetry info

Code refactor

added review comments

added review comments

removed tslint from package.json

added log in ServicePrincipalLogin

added boolean for error log

Added Unit tests (Azure#15)

* Added unit tests for Azure PowerShell

* Added unit tests

* changes in utils

* removed babel

* changed variable name of enable-PSSession

* refactor

* added ci.yml

* changes in utils test

making login calls silent (Azure#19)

Co-authored-by: Deepak Sattiraju <desattir@microsoft.com>

update utils test (Azure#16)

* update utils test

* update utils test

* update serviceprincipallogin test
aksm-ms added a commit to aksm-ms/login that referenced this pull request May 4, 2020
Changes in loginAzurePowerShell.ts

using latest version

Added getlatestazmodule version

changes in runner info

code refactor

changes in loginAzurePowerShell

code refactor

Code refactor

Code refactor

added review comments

changes in scriptbuilder

changes in setmodulepath

added paths in tsconfig.json

Revert "added paths in tsconfig.json"

This reverts commit cb2f417.

changes in action.yml

changes in main

added review comments

Added changes for review comments

Modified description in action.yml

Added telemetry info

Code refactor

added review comments

added review comments

removed tslint from package.json

added log in ServicePrincipalLogin

added boolean for error log

Added Unit tests (Azure#15)

* Added unit tests for Azure PowerShell

* Added unit tests

* changes in utils

* removed babel

* changed variable name of enable-PSSession

* refactor

* added ci.yml

* changes in utils test

making login calls silent (Azure#19)

Co-authored-by: Deepak Sattiraju <desattir@microsoft.com>

update utils test (Azure#16)

* update utils test

* update utils test

* update serviceprincipallogin test
aksm-ms added a commit to aksm-ms/login that referenced this pull request May 4, 2020
Changes in loginAzurePowerShell.ts

using latest version

Added getlatestazmodule version

changes in runner info

code refactor

changes in loginAzurePowerShell

code refactor

Code refactor

Code refactor

added review comments

changes in scriptbuilder

changes in setmodulepath

added paths in tsconfig.json

Revert "added paths in tsconfig.json"

This reverts commit cb2f417.

changes in action.yml

changes in main

added review comments

Added changes for review comments

Modified description in action.yml

Added telemetry info

Code refactor

added review comments

added review comments

removed tslint from package.json

added log in ServicePrincipalLogin

added boolean for error log

Added Unit tests (Azure#15)

* Added unit tests for Azure PowerShell

* Added unit tests

* changes in utils

* removed babel

* changed variable name of enable-PSSession

* refactor

* added ci.yml

* changes in utils test

making login calls silent (Azure#19)

Co-authored-by: Deepak Sattiraju <desattir@microsoft.com>

update utils test (Azure#16)

* update utils test

* update utils test

* update serviceprincipallogin test
aksm-ms added a commit that referenced this pull request May 6, 2020
Changes in loginAzurePowerShell.ts

using latest version

Added getlatestazmodule version

changes in runner info

code refactor

changes in loginAzurePowerShell

code refactor

Code refactor

Code refactor

added review comments

changes in scriptbuilder

changes in setmodulepath

added paths in tsconfig.json

Revert "added paths in tsconfig.json"

This reverts commit cb2f417.

changes in action.yml

changes in main

added review comments

Added changes for review comments

Modified description in action.yml

Added telemetry info

Code refactor

added review comments

added review comments

removed tslint from package.json

added log in ServicePrincipalLogin

added boolean for error log

Added Unit tests (#15)

* Added unit tests for Azure PowerShell

* Added unit tests

* changes in utils

* removed babel

* changed variable name of enable-PSSession

* refactor

* added ci.yml

* changes in utils test
aksm-ms added a commit that referenced this pull request May 6, 2020
* Initial commit

* updating package version

* adding secret info link in logs

* adding user-agent

* Update README.md

* Added changes for azure powershell login

Changes in loginAzurePowerShell.ts

using latest version

Added getlatestazmodule version

changes in runner info

code refactor

changes in loginAzurePowerShell

code refactor

Code refactor

Code refactor

added review comments

changes in scriptbuilder

changes in setmodulepath

added paths in tsconfig.json

Revert "added paths in tsconfig.json"

This reverts commit cb2f417.

changes in action.yml

changes in main

added review comments

Added changes for review comments

Modified description in action.yml

Added telemetry info

Code refactor

added review comments

added review comments

removed tslint from package.json

added log in ServicePrincipalLogin

added boolean for error log

Added Unit tests (#15)

* Added unit tests for Azure PowerShell

* Added unit tests

* changes in utils

* removed babel

* changed variable name of enable-PSSession

* refactor

* added ci.yml

* changes in utils test

making login calls silent (#19)

Co-authored-by: Deepak Sattiraju <desattir@microsoft.com>

update utils test (#16)

* update utils test

* update utils test

* update serviceprincipallogin test

Co-authored-by: Microsoft GitHub User <msftgits@microsoft.com>
Co-authored-by: Sumiran Aggarwal <suaggar@microsoft.com>
Co-authored-by: UshaN <ushan@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants